Digital video streams may represent video using a sequence of frames or still images. Digital video can be used for various applications including, for example, video conferencing, high definition video entertainment, video advertisements, or sharing of user-generated videos. A digital video stream can contain a large amount of data and consume a significant amount of computing or communication resources of a computing device for processing, transmission or storage of the video data. Various approaches have been proposed to reduce the amount of data in video streams, including compression and other encoding techniques.
Encoding based on motion estimation and compensation may be performed by breaking frames or images into blocks which are predicted based on one or more prediction blocks of reference frames. Differences (i.e., residual errors) between blocks and prediction blocks are transformed frequency domain transform coefficients. The transform coefficients are compressed and encoded in a bitstream using context models. A decoder uses the encoded transform coefficients and the reference frames to reconstruct the frames or images.